package pl.edu.agh.uddiProxy.client;

import java.util.Arrays;
import java.util.List;

import com.google.gwt.user.client.ui.ClickListener;

public class StaticQueryPanel extends QueryHorizontalPanel {
	private static final String[] LOGICAL_OPERATORS = new String[]{ "", "AND"};
	
	public static final String SERVICE_NAME = "service name";
	public static final String PROVIDER_NAME = "provider name";
	public static final String TMODEL_KEY = "tModelKey";
	public static final String CATEGORY_ISO3166 = "iso3166";
	public static final String GENERAL_KEYWORDS = "general_keywords";

	private static List<String> labelList;
	static {
		labelList = Arrays.asList(new String[] { SERVICE_NAME, PROVIDER_NAME, TMODEL_KEY, CATEGORY_ISO3166, GENERAL_KEYWORDS });
	}
	
	public StaticQueryPanel(ClickListener searchClickListener) {
		super(labelList, LOGICAL_OPERATORS, searchClickListener);
	}

	public String getParameter() {
		return nameListBox.getItemText(nameListBox.getSelectedIndex());
	}
	
	public String getValue() {
		return valueTextBox.getText();
	}
}
